import request from "@/router/axios";

export const getProductCategoryList = (params) => {
  return request({
    url: "/admin/productCategory/tree",
    method: "get",
    params: { ...params },
  });
};

export const updateProductCategoryItem = (row) => {
  return request({
    url: "/admin/productCategory/save",
    method: "post",
    data: row,
  });
};

export const delProductCategoryItem = (row) => {
  return request({
    url: "/admin/productCategory/delete",
    method: "post",
    data: row,
  });
};

export const sortProductCategoryItem = (row) => {
  return request({
    url: "/admin/productCategory/sort",
    method: "post",
    data: row,
  });
};

export const setProductCategoryItemStatus = (row) => {
  return request({
    url: "/admin/productCategory/setStatus",
    method: "post",
    data: row,
  });
};
